home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / AIncludes / Lists.a < prev    next >
Encoding:
Text File  |  1998-08-17  |  11.8 KB  |  497 lines  |  [TEXT/MPS ]

  1. ;
  2. ;    File:        Lists.a
  3. ;
  4. ;    Contains:    List Manager Interfaces.
  5. ;
  6. ;    Version:    Technology:    Mac OS 8
  7. ;                Release:    Universal Interfaces 3.2
  8. ;
  9. ;    Copyright:    © 1985-1998 by Apple Computer, Inc., all rights reserved
  10. ;
  11. ;    Bugs?:        For bug reports, consult the following page on
  12. ;                the World Wide Web:
  13. ;
  14. ;                    http://developer.apple.com/bugreporter/
  15. ;
  16. ;
  17.     IF &TYPE('__LISTS__') = 'UNDEFINED' THEN
  18. __LISTS__ SET 1
  19.  
  20.     IF &TYPE('__MACTYPES__') = 'UNDEFINED' THEN
  21.     include 'MacTypes.a'
  22.     ENDIF
  23.     IF &TYPE('__CONTROLS__') = 'UNDEFINED' THEN
  24.     include 'Controls.a'
  25.     ENDIF
  26.  
  27. Cell                    RECORD 0
  28. f                         ds        Point
  29. sizeof                     EQU *                    ; size:   $4 (4)
  30.                         ENDR
  31.  
  32.  
  33. ListBounds                RECORD 0
  34. f                         ds        Rect
  35. sizeof                     EQU *                    ; size:   $8 (8)
  36.                         ENDR
  37.  
  38.  
  39. DataArray                RECORD 0
  40. elements                 ds.b    32001
  41.                          ORG 32002
  42. sizeof                     EQU *                    ; size:   $7D02 (32002)
  43.                         ENDR
  44.  
  45.  
  46.     IF ¬ TARGET_OS_MAC THEN
  47. ;  QuickTime 3.0 
  48. ; typedef long                             ListNotification
  49.  
  50.  
  51. listNotifyNothing                EQU        'nada'                ; No (null) notification
  52. listNotifyClick                    EQU        'clik'                ; Control was clicked
  53. listNotifyDoubleClick            EQU        'dblc'                ; Control was double-clicked
  54. listNotifyPreClick                EQU        'pclk'                ; Control about to be clicked
  55.     ENDIF
  56. ListRec                    RECORD 0
  57. rView                     ds        Rect            ; offset: $0 (0)
  58. port                     ds.l    1                ; offset: $8 (8)
  59. indent                     ds        Point            ; offset: $C (12)
  60. cellSize                 ds        Point            ; offset: $10 (16)
  61. visible                     ds        ListBounds        ; offset: $14 (20)
  62. vScroll                     ds.l    1                ; offset: $1C (28)
  63. hScroll                     ds.l    1                ; offset: $20 (32)
  64. selFlags                 ds.b    1                ; offset: $24 (36)
  65. lActive                     ds.b    1                ; offset: $25 (37)
  66. lReserved                 ds.b    1                ; offset: $26 (38)
  67. listFlags                 ds.b    1                ; offset: $27 (39)
  68. clikTime                 ds.l    1                ; offset: $28 (40)
  69. clikLoc                     ds        Point            ; offset: $2C (44)
  70. mouseLoc                 ds        Point            ; offset: $30 (48)
  71. lClickLoop                 ds.l    1                ; offset: $34 (52)
  72. lastClick                 ds        Cell            ; offset: $38 (56)
  73. refCon                     ds.l    1                ; offset: $3C (60)
  74. listDefProc                 ds.l    1                ; offset: $40 (64)
  75. userHandle                 ds.l    1                ; offset: $44 (68)
  76. dataBounds                 ds        ListBounds        ; offset: $48 (72)
  77. cells                     ds.l    1                ; offset: $50 (80)
  78. maxIndex                 ds.w    1                ; offset: $54 (84)
  79. cellArray                 ds.w    1                ; offset: $56 (86) <-- really an array of length one
  80. sizeof                     EQU *                    ; size:   $58 (88)
  81.                         ENDR
  82. ; typedef struct ListRec *                ListPtr
  83.  
  84. ; typedef ListPtr *                        ListHandle
  85.  
  86. ;  ListRef is obsolete.  Use ListHandle. 
  87. ; typedef ListHandle                     ListRef
  88.  
  89.  
  90.  
  91.  
  92.                                                             ; ListRec.listFlags bits
  93. lDoVAutoscrollBit                EQU        1
  94. lDoHAutoscrollBit                EQU        0
  95.  
  96.                                                             ; ListRec.listFlags masks
  97. lDoVAutoscroll                    EQU        2
  98. lDoHAutoscroll                    EQU        1
  99.  
  100.  
  101.                                                             ; ListRec.selFlags bits
  102. lOnlyOneBit                        EQU        7
  103. lExtendDragBit                    EQU        6
  104. lNoDisjointBit                    EQU        5
  105. lNoExtendBit                    EQU        4
  106. lNoRectBit                        EQU        3
  107. lUseSenseBit                    EQU        2
  108. lNoNilHiliteBit                    EQU        1
  109.  
  110.  
  111.                                                             ; ListRec.selFlags masks
  112. lOnlyOne                        EQU        -128
  113. lExtendDrag                        EQU        64
  114. lNoDisjoint                        EQU        32
  115. lNoExtend                        EQU        16
  116. lNoRect                            EQU        8
  117. lUseSense                        EQU        4
  118. lNoNilHilite                    EQU        2
  119.  
  120.  
  121.                                                             ; LDEF messages
  122. lInitMsg                        EQU        0
  123. lDrawMsg                        EQU        1
  124. lHiliteMsg                        EQU        2
  125. lCloseMsg                        EQU        3
  126.  
  127.  
  128.  
  129.  
  130.  
  131.     IF ¬ TARGET_OS_MAC THEN
  132. ;  QuickTime 3.0 
  133. ;
  134. ; extern void LSetNotificationCallback(ListNotificationProcPtr callBack, ListHandle lHandle)
  135. ;
  136.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  137.         IMPORT_CFM_FUNCTION LSetNotificationCallback
  138.     ENDIF
  139.  
  140.     ENDIF
  141.  
  142.  
  143. ;
  144. ; pascal ListHandle LNew(const Rect *rView, const ListBounds *dataBounds, Point cSize, short theProc, WindowPtr theWindow, Boolean drawIt, Boolean hasGrow, Boolean scrollHoriz, Boolean scrollVert)
  145. ;
  146.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  147.         Macro
  148.         _LNew
  149.             move.w              #$0044,-(sp)
  150.             dc.w                $A9E7
  151.         EndM
  152.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  153.         IMPORT_CFM_FUNCTION LNew
  154.     ENDIF
  155.  
  156. ;
  157. ; pascal void LDispose(ListHandle lHandle)
  158. ;
  159.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  160.         Macro
  161.         _LDispose
  162.             move.w              #$0028,-(sp)
  163.             dc.w                $A9E7
  164.         EndM
  165.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  166.         IMPORT_CFM_FUNCTION LDispose
  167.     ENDIF
  168.  
  169. ;
  170. ; pascal short LAddColumn(short count, short colNum, ListHandle lHandle)
  171. ;
  172.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  173.         Macro
  174.         _LAddColumn
  175.             move.w              #$0004,-(sp)
  176.             dc.w                $A9E7
  177.         EndM
  178.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  179.         IMPORT_CFM_FUNCTION LAddColumn
  180.     ENDIF
  181.  
  182. ;
  183. ; pascal short LAddRow(short count, short rowNum, ListHandle lHandle)
  184. ;
  185.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  186.         Macro
  187.         _LAddRow
  188.             move.w              #$0008,-(sp)
  189.             dc.w                $A9E7
  190.         EndM
  191.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  192.         IMPORT_CFM_FUNCTION LAddRow
  193.     ENDIF
  194.  
  195. ;
  196. ; pascal void LDelColumn(short count, short colNum, ListHandle lHandle)
  197. ;
  198.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  199.         Macro
  200.         _LDelColumn
  201.             move.w              #$0020,-(sp)
  202.             dc.w                $A9E7
  203.         EndM
  204.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  205.         IMPORT_CFM_FUNCTION LDelColumn
  206.     ENDIF
  207.  
  208. ;
  209. ; pascal void LDelRow(short count, short rowNum, ListHandle lHandle)
  210. ;
  211.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  212.         Macro
  213.         _LDelRow
  214.             move.w              #$0024,-(sp)
  215.             dc.w                $A9E7
  216.         EndM
  217.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  218.         IMPORT_CFM_FUNCTION LDelRow
  219.     ENDIF
  220.  
  221. ;
  222. ; pascal Boolean LGetSelect(Boolean next, Cell *theCell, ListHandle lHandle)
  223. ;
  224.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  225.         Macro
  226.         _LGetSelect
  227.             move.w              #$003C,-(sp)
  228.             dc.w                $A9E7
  229.         EndM
  230.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  231.         IMPORT_CFM_FUNCTION LGetSelect
  232.     ENDIF
  233.  
  234. ;
  235. ; pascal Cell LLastClick(ListHandle lHandle)
  236. ;
  237.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  238.         Macro
  239.         _LLastClick
  240.             move.w              #$0040,-(sp)
  241.             dc.w                $A9E7
  242.         EndM
  243.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  244.         IMPORT_CFM_FUNCTION LLastClick
  245.     ENDIF
  246.  
  247. ;
  248. ; pascal Boolean LNextCell(Boolean hNext, Boolean vNext, Cell *theCell, ListHandle lHandle)
  249. ;
  250.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  251.         Macro
  252.         _LNextCell
  253.             move.w              #$0048,-(sp)
  254.             dc.w                $A9E7
  255.         EndM
  256.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  257.         IMPORT_CFM_FUNCTION LNextCell
  258.     ENDIF
  259.  
  260. ;
  261. ; pascal Boolean LSearch(const void *dataPtr, short dataLen, ListSearchUPP searchProc, Cell *theCell, ListHandle lHandle)
  262. ;
  263.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  264.         Macro
  265.         _LSearch
  266.             move.w              #$0054,-(sp)
  267.             dc.w                $A9E7
  268.         EndM
  269.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  270.         IMPORT_CFM_FUNCTION LSearch
  271.     ENDIF
  272.  
  273. ;
  274. ; pascal void LSize(short listWidth, short listHeight, ListHandle lHandle)
  275. ;
  276.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  277.         Macro
  278.         _LSize
  279.             move.w              #$0060,-(sp)
  280.             dc.w                $A9E7
  281.         EndM
  282.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  283.         IMPORT_CFM_FUNCTION LSize
  284.     ENDIF
  285.  
  286. ;
  287. ; pascal void LSetDrawingMode(Boolean drawIt, ListHandle lHandle)
  288. ;
  289.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  290.         Macro
  291.         _LSetDrawingMode
  292.             move.w              #$002C,-(sp)
  293.             dc.w                $A9E7
  294.         EndM
  295.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  296.         IMPORT_CFM_FUNCTION LSetDrawingMode
  297.     ENDIF
  298.  
  299. ;
  300. ; pascal void LScroll(short dCols, short dRows, ListHandle lHandle)
  301. ;
  302.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  303.         Macro
  304.         _LScroll
  305.             move.w              #$0050,-(sp)
  306.             dc.w                $A9E7
  307.         EndM
  308.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  309.         IMPORT_CFM_FUNCTION LScroll
  310.     ENDIF
  311.  
  312. ;
  313. ; pascal void LAutoScroll(ListHandle lHandle)
  314. ;
  315.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  316.         Macro
  317.         _LAutoScroll
  318.             move.w              #$0010,-(sp)
  319.             dc.w                $A9E7
  320.         EndM
  321.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  322.         IMPORT_CFM_FUNCTION LAutoScroll
  323.     ENDIF
  324.  
  325. ;
  326. ; pascal void LUpdate(RgnHandle theRgn, ListHandle lHandle)
  327. ;
  328.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  329.         Macro
  330.         _LUpdate
  331.             move.w              #$0064,-(sp)
  332.             dc.w                $A9E7
  333.         EndM
  334.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  335.         IMPORT_CFM_FUNCTION LUpdate
  336.     ENDIF
  337.  
  338. ;
  339. ; pascal void LActivate(Boolean act, ListHandle lHandle)
  340. ;
  341.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  342.         Macro
  343.         _LActivate
  344.             clr.w               -(sp)
  345.             dc.w                $A9E7
  346.         EndM
  347.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  348.         IMPORT_CFM_FUNCTION LActivate
  349.     ENDIF
  350.  
  351. ;
  352. ; pascal void LCellSize(Point cSize, ListHandle lHandle)
  353. ;
  354.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  355.         Macro
  356.         _LCellSize
  357.             move.w              #$0014,-(sp)
  358.             dc.w                $A9E7
  359.         EndM
  360.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  361.         IMPORT_CFM_FUNCTION LCellSize
  362.     ENDIF
  363.  
  364. ;
  365. ; pascal Boolean LClick(Point pt, short modifiers, ListHandle lHandle)
  366. ;
  367.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  368.         Macro
  369.         _LClick
  370.             move.w              #$0018,-(sp)
  371.             dc.w                $A9E7
  372.         EndM
  373.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  374.         IMPORT_CFM_FUNCTION LClick
  375.     ENDIF
  376.  
  377. ;
  378. ; pascal void LAddToCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  379. ;
  380.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  381.         Macro
  382.         _LAddToCell
  383.             move.w              #$000C,-(sp)
  384.             dc.w                $A9E7
  385.         EndM
  386.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  387.         IMPORT_CFM_FUNCTION LAddToCell
  388.     ENDIF
  389.  
  390. ;
  391. ; pascal void LClrCell(Cell theCell, ListHandle lHandle)
  392. ;
  393.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  394.         Macro
  395.         _LClrCell
  396.             move.w              #$001C,-(sp)
  397.             dc.w                $A9E7
  398.         EndM
  399.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  400.         IMPORT_CFM_FUNCTION LClrCell
  401.     ENDIF
  402.  
  403. ;
  404. ; pascal void LGetCell(void *dataPtr, short *dataLen, Cell theCell, ListHandle lHandle)
  405. ;
  406.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  407.         Macro
  408.         _LGetCell
  409.             move.w              #$0038,-(sp)
  410.             dc.w                $A9E7
  411.         EndM
  412.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  413.         IMPORT_CFM_FUNCTION LGetCell
  414.     ENDIF
  415.  
  416. ;
  417. ; pascal void LRect(Rect *cellRect, Cell theCell, ListHandle lHandle)
  418. ;
  419.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  420.         Macro
  421.         _LRect
  422.             move.w              #$004C,-(sp)
  423.             dc.w                $A9E7
  424.         EndM
  425.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  426.         IMPORT_CFM_FUNCTION LRect
  427.     ENDIF
  428.  
  429. ;
  430. ; pascal void LSetCell(const void *dataPtr, short dataLen, Cell theCell, ListHandle lHandle)
  431. ;
  432.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  433.         Macro
  434.         _LSetCell
  435.             move.w              #$0058,-(sp)
  436.             dc.w                $A9E7
  437.         EndM
  438.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  439.         IMPORT_CFM_FUNCTION LSetCell
  440.     ENDIF
  441.  
  442. ;
  443. ; pascal void LSetSelect(Boolean setIt, Cell theCell, ListHandle lHandle)
  444. ;
  445.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  446.         Macro
  447.         _LSetSelect
  448.             move.w              #$005C,-(sp)
  449.             dc.w                $A9E7
  450.         EndM
  451.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  452.         IMPORT_CFM_FUNCTION LSetSelect
  453.     ENDIF
  454.  
  455. ;
  456. ; pascal void LDraw(Cell theCell, ListHandle lHandle)
  457. ;
  458.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  459.         Macro
  460.         _LDraw
  461.             move.w              #$0030,-(sp)
  462.             dc.w                $A9E7
  463.         EndM
  464.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  465.         IMPORT_CFM_FUNCTION LDraw
  466.     ENDIF
  467.  
  468.  
  469. ;
  470. ; pascal void LGetCellDataLocation(short *offset, short *len, Cell theCell, ListHandle lHandle)
  471. ;
  472.     IF TARGET_OS_MAC ** TARGET_CPU_68K ** ¬ TARGET_RT_MAC_CFM THEN
  473.         Macro
  474.         _LGetCellDataLocation
  475.             move.w              #$0034,-(sp)
  476.             dc.w                $A9E7
  477.         EndM
  478.     ELSEIF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  479.         IMPORT_CFM_FUNCTION LGetCellDataLocation
  480.     ENDIF
  481.  
  482.     IF ¬ TARGET_OS_MAC THEN
  483. ;  QuickTime 3.0 
  484. ;
  485. ; extern void LSetLDEF(ListDefProcPtr proc, ListRef lHandle)
  486. ;
  487.     IF TARGET_OS_MAC ** TARGET_RT_MAC_CFM THEN
  488.         IMPORT_CFM_FUNCTION LSetLDEF
  489.     ENDIF
  490.  
  491.     ENDIF
  492.     IF OLDROUTINENAMES THEN
  493.     ENDIF    ; OLDROUTINENAMES
  494.  
  495.     ENDIF ; __LISTS__ 
  496.  
  497.